Problem Note 42554: The table.Model property does not work in the SAS® Financial Management Add-In API for Microsoft Excel
The table.Model property in the SAS Financial Management Add-In API for the Microsoft Excel FMTable Class does not return the expected results.
When you submit Visual Basic (VBA) code to programmatically change the model that a SAS Financial Management table references, the table model does not correctly change.
For example, if your current table reads from the model 'Financial(Financial)' and you want to programmatically change the model to 'Budget(Budget)', you might submit the following VBA code to use the table.Model property in the SAS Financial Management Add-In API for the Microsoft Excel FMTable Class.
Public Sub change_model()
Dim addin As FMAddIn
Dim conn As Connect
Dim table As FMTable
Set conn = Application.COMAddIns.Item("SASSESExcelAddIn.Connect").Object
Set addin = conn.FMAddIn
;Set table = addin.Tables("NewTable0")
If table.Model = "Financial" Then
table.Model = "Budget"
Else
table.Model = "Financial"
End If
addin.RefreshAll
table.Refresh (True)
End Sub
However, after you run this code, the table does not update properly. Specifically, you select Tables ► Properties and then select the Dimensions tab, the model changes to 'Financial(Budget)' instead of to 'Budget(Budget)'.
Click the Hot Fix tab in this note to access the hot fix for this issue.
For additional information about this problem, contact SAS Technical Support.
For more information about the SAS Financial Management Add-In API for Microsoft Excel, refer to the "SAS Solutions Services Customization Guide".
Note that when you are executing the code above, if you receive the compile error Error in loading DLL, you can register SASSESExcelAddin.dll as follows:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe /codebase /tlb SASSESExcelAddin.dll
Operating System and Release Information
SAS System | SAS Financial Management | Microsoft® Windows® for x64 | 5.1 | 5.3 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 5.1 | 5.3 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 5.1 | 5.3 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 5.1 | 5.3 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 for x64 | 5.1 | 5.3 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2008 for x64 | 5.1 | 5.3 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 5.1 | 5.3 | 9.2 TS2M0 | 9.3 TS1M0 |
Windows Vista | 5.1 | 5.3 | 9.2 TS2M0 | 9.3 TS1M0 |
Windows Vista for x64 | 5.1 | 5.3 | 9.2 TS2M0 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The table.Model property does not change the table's model. The code string is changed but the actual table cube is not changed.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2011-03-24 10:07:34 |
Date Created: | 2011-03-01 10:42:25 |